<%@ page language="java" autoFlush="true" errorPage="../error.jsp" %>
<%@ page import="org.unitime.timetable.util.Constants" %>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/tld/timetable.tld" prefix="tt" %>
<tiles:importAttribute />
<html:form action="/designatorList">
	<TABLE border="0" cellspacing="1" cellpadding="3">
		<TR>
			<TD valign="top"><B>Asunto: </B></TD>
			<TD valign="top">
				<html:select name="designatorListForm" property="subjectAreaId"
					onfocus="setUp();" 
					onkeypress="return selectSearch(event, this);" 
					onkeydown="return checkKey(event, this);">
					<html:option value="<%=Constants.BLANK_OPTION_VALUE%>"><%=Constants.BLANK_OPTION_LABEL%></html:option>
					<html:optionsCollection property="subjectAreas"	label="subjectAreaAbbreviation" value="uniqueId" />
				</html:select>
			</TD>
			<TD valign="top">
				&nbsp;&nbsp;&nbsp;
				<html:submit property="op" 
					accesskey="S" styleClass="btn" titleKey="title.displayDesignatorList"
					onclick="displayLoading();">
					<bean:message key="button.displayDesignatorList" />
				</html:submit> 
			</TD>
			<TD valign="top">
				<html:submit property="op" 
					accesskey="P" styleClass="btn" titleKey="title.exportPDF">
					<bean:message key="button.exportPDF" />
				</html:submit> 
			</TD>
			<logic:equal name="designatorListForm" property="editable" value="true">
				<TD valign="top">
					<html:submit property="op" 
						accesskey="A" styleClass="btn" titleKey="title.addDesignator">
						<bean:message key="button.addDesignator" />
					</html:submit> 
				</TD>
			</logic:equal>
		</TR>
		<TR>
			<TD colspan="4" align="center">
				<html:errors />
			</TD>
		</TR>
	</TABLE>	
</html:form>
<%
	if (request.getAttribute("designatorList")!=null) {
%>
	<script language="javascript">displayLoading();</script>
	<TABLE border="0" cellspacing="1" cellpadding="3">
		<%=request.getAttribute("designatorList")%>
	</TABLE>	
	<script language="javascript">displayElement('loading', false);</script>
<%		
	}
%>